package cn.dengta.webapp.user.model;

import cn.dengta.common.model.ValueProxy;
import cn.dengta.common.model.ValueProxyImpl;
import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.Getter;

/**
 * 咨询类型
 */
@Getter
public enum AskContactType implements ValueProxyImpl<AskContactType, Integer> {
	/** 官方 */
	OFFICIAL(0, "官方"),
	/** 主播 */
	ANCHOR(1, "主播"),
	//
	;

	// 定义私有变量
	@EnumValue
	public final Integer value;
	final ValueProxy<AskContactType, Integer> proxy;

	// 构造函数，枚举类型只能为私有
	AskContactType(Integer value, String label) {
		this.value = value;
		this.proxy = new ValueProxy<>(this, value, label);
	}

	public static AskContactType[] getValues() {
		return ValueProxy.getCachedArray(AskContactType.class, AskContactType::values);
	}

	public static AskContactType of(Integer value) {
		return OFFICIAL.getValueOf(value);
	}

}
